package com.zq.widget.inverted.game.role.anim;

import android.animation.TypeEvaluator;
import android.graphics.PointF;

/**
 * Created by zhangqiang on 2018/4/2.
 */
public class LinearPointFEvaluator implements TypeEvaluator<PointF> {

    @Override
    public PointF evaluate(float fraction, PointF startValue, PointF endValue) {

        float x = startValue.x + (endValue.x - startValue.x) * fraction;
        float y = startValue.y + (endValue.y - startValue.y) * fraction;
        return new PointF(x,y);
    }
}
